﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package de.polygonal.ds.sort.compare {

    public function compareStringCaseInSensitive(_arg1:String, _arg2:String):int{
        var _local3:int;
        var _local4:int;
        var _local5:int;
        _arg1 = _arg1.toLowerCase();
        _arg2 = _arg2.toLowerCase();
        if ((_arg1.length + _arg2.length) > 2){
            _local3 = 0;
            _local4 = ((_arg1.length > _arg2.length)) ? _arg1.length : _arg2.length;
            _local5 = 0;
            while (_local5 < _local4) {
                _local3 = (_arg1.charCodeAt(_local5) - _arg2.charCodeAt(_local5));
                if (_local3 != 0){
                    break;
                };
                _local5++;
            };
            return (_local3);
        };
        return ((_arg1.charCodeAt(0) - _arg2.charCodeAt(0)));
    }
}//package de.polygonal.ds.sort.compare 
